<template>
  <div :class="'gva-body-h h-full bg-gray-50 overflow-hidden' + useDarkClass()">
    <n-config-provider
      :locale="zhCN"
      :date-locale="dateZhCN"
      :theme="theme"
      :theme-overrides="$app.themeOverrides"
      class="h-full"
    >
      <n-modal-provider>
        <n-message-provider>
          <RouterView />
          <Message></Message>
        </n-message-provider>
      </n-modal-provider>
    </n-config-provider>
  </div>
</template>
<script setup lang="ts">
import { darkTheme, lightTheme } from "naive-ui";
import { useDarkClass } from "@/hooks/useCommon";
import useResponsive from "@/hooks/responsive";
import Message from "@/components/message.vue"
import { useAppStore } from "@/stores";
import { zhCN, dateZhCN } from "naive-ui";
const $app = useAppStore();
// 响应式的，获取当前平台，切换样式
useResponsive(true);
const theme = computed(() => {
  return $app.theme === "dark" ? darkTheme : lightTheme;
});
</script>
